var Dog = require("./dog.js");
var dog=new Dog('taidy');

//dog对象具备EventEmitter的属性方法
dog.on('bark',()=>{
    console.log(this)
    dog.bark();
})
setTimeout(()=>{
    dog.emit('bark')
},1000)